import React, { Component } from 'react'
import { Row, Col, DatePicker } from 'antd'

class Index extends Component{


    render(){
        const {label, onChange} = this.props
        return <Row>
            <Col span={5} style={{ textAlign: 'right' }}>{label}时间：</Col>
            <Col span={19}>
                <DatePicker.RangePicker onChange={(_, value)=>{
                    onChange({
                        startDate: value[0],
                        endDate: value[1],
                    })
                }}
                allowClear={true} />
            </Col>
        </Row>
    }
}

export default Index